Skip to content

Protect players from hostile mobs in claims - #8284

Open
pernio wants to merge 2 commits into
TownyAdvanced:masterfrom
pernio:feat/hostile-mob-protection
Open

Protect players from hostile mobs in claims#8284
pernio wants to merge 2 commits into
TownyAdvanced:masterfrom
pernio:feat/hostile-mob-protection

Conversation

@pernio

@pernio pernio commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description:

Add protection for players against hostile mobs when they are standing in a plot where mobs aren't allowed. Currently, players take damage when they are e.g. afk inside claims. This fixes that issue and prevents damage dealt.
Notes:

  • If needed, this can be locked behind a config option.
  • Only monsters are blocked, this means that players still take damage from tamed wolves ect.

Attestations

  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

In making this pull request, I declare that I have not used an AI toolset to design or code this pull request, and that I am a human who coded this without any influence from an LLM.

@LlmDl

LlmDl commented Aug 22, 2026

Copy link
Copy Markdown
Member

Not sure about this one.

Unless the player in a mobs-off plot cannot hurt mobs in mobs-on plots, players gain a really overpowered advantage.

Mob farms could be made where afk players are invincible, probably making the game too easy for servers' economies.

A player who is actually afk could just put themselves in a room without open windows and doors.

@pernio

pernio commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Would it resolve the concern if it's locked behind a config setting? I use this in a standalone addon to Towny and I have never had the issue where players abuse this.

@LlmDl

LlmDl commented Aug 22, 2026 via email

Copy link
Copy Markdown
Member

@pernio

pernio commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

@LlmDl This should be locked now behind a config node which is default set to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants